for i in range(1, 101):
    for j in range(1, 101):
        if i * 5 + j * 3 + (100 - i - j) / 3 == 100:
            print("公鸡有%d只，母鸡有%d只，小鸡有%d只" % (i, j, 100-i-j))